from foftact.db.dbutil import pooled_db

# 从连接池获取连接
conn = pooled_db.connection()
#获取游标
cursor = conn.cursor()
#执行sql
tmp = cursor.execute(f'INSERT INTO your_table (column1, column2, ...)'\
f'VALUES (value1, value2, ...),'\
f'       (value3, value4, ...),'\
f'ON DUPLICATE KEY UPDATE column1 = VALUES(column1), column2 = VALUES(column2);')
#提交事务
conn.commit()